package com.yzk.frame.orm.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

interface IGenericDAO<T,PK extends Serializable> {
	
	
	public boolean save(T entity);
	public boolean update(T entity) ;
	public boolean delete(PK id);
	public T findById(Class<T> entity,PK id);
	public T getByProperty(Class<T> entity,String proname,String provalue);
	public List<T> query(Class<T> clz, String scope);  
	public List<T> query(Class<T> clz, String scope, Collection paras);  
	public List<T> query(Class<T> clz, String scope, Collection paras, int begin, int max);  
	public Object uniqueResult(String sql);  
	public Object uniqueResult(String sql,Collection paras);  
	public int execute(String sql);   
	public int execute(String sql,Collection paras);  
}
